<f:subview id="vLoading" xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:ui="http://java.sun.com/jsf/facelets"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui"> 

<p:ajaxStatus onstart="pnlLoading.show()" oncomplete="pnlLoading.hide()" />

<p:dialog widgetVar="pnlLoading" modal="true" resizable="false" draggable="false" closable="false" width="220" height="100">
  <table width="100%" style="height: 100%" border="0">
    <tr>
      <td align="right" valign="middle"><h:graphicImage value="/images/loading.gif" /></td>
      <td align="left" valign="middle"><font style="font-weight: bolder;"><h:outputText value="Por favor, aguarde..." styleClass="formLabel" /></font></td>
    </tr>
  </table>
</p:dialog>

</f:subview>   

